<template>
    <van-nav-bar title="标题" left-text="返回" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
        <template #right>
            <van-icon name="search" size="18" />
        </template>
    </van-nav-bar>

    <div name="content">
        <router-view />
    </div>
    <van-tabbar route @change="onChange">
        <van-tabbar-item to="/" icon="home-o" name="index">主页</van-tabbar-item>
        <van-tabbar-item to="/team" icon="search" name="team">队伍</van-tabbar-item>
        <van-tabbar-item to="/user" icon="friends-o" name="user">个人</van-tabbar-item>
    </van-tabbar>


</template>

<script setup>
    import { Toast } from 'vant';
    const onClickLeft = () => alert('点击左侧按钮')
    const onClickRight = () => alert('点击右侧按钮')
    const onChange = (index) => Toast(`标签 ${index}`);
</script>
